#include <stdio.h>

int main(){
    //按位与
    int a = 4; // 0100 
    int b = 7; // 0111
    printf("%d\n",a&b);

    //按位或
    a = 9; //1001
    b = 5; //0101
    printf("%d\n",a|b); // 1101=13

    //异或
    a= 9;//1001
    b = 5;//0101
    a=a^b;
    b=a^b;
    a=a^b;
    printf("%d,%d\n",a,b); // 1100
printf("%d\n",a^0xffffffff); // 0110
    
}